﻿#ifndef UDPSENDER_H
#define UDPSENDER_H

#include <QObject>
#include <QUdpSocket>
#include <QJsonObject>

class UdpSender : public QObject
{
    Q_OBJECT
public:
    explicit UdpSender(QObject *parent = nullptr);
    void sendJson(QJsonObject obj);
    bool setIpAndPort(QString ip, int port);
private:
    QUdpSocket *sender;
    QHostAddress address;
    int port;
};

#endif // UDPSENDER_H
